home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- //
- // Creation Date: May 29, 1997
- // Author: ajp
- //
- // Procedure Name:
- // AEanimCurveCommon
- //
- // Description Name;
- // Creates the attribute editor controls for the animCurve node
- //
- // Input Value:
- // nodeName
- //
- // Output Value:
- // None
- //
-
- global proc animCurveExpand_CB ()
- {
- if (`checkBoxGrp -query -value1 expandChkBoxGrp`) {
- keyframeOutliner -edit -display "wide" keyOutliner;
- }
- else {
- keyframeOutliner -edit -display "narrow" keyOutliner;
- }
- }
-
- global proc AEupdateWeightOptionGrp (string $parent, string $control, string $nodeName)
- {
- setParent $parent;
- int $weighted[] = `keyTangent -query -weightedTangents $nodeName`;
- checkBoxGrp -edit
- -value1 $weighted[0]
- $control;
- }
-
- global proc AEanimCurveNew (string $attr)
- {
- string $buffer[];
- tokenize($attr,".",$buffer);
- string $nodeName = $buffer[0];
-
- string $retval = `columnLayout
- -adjustableColumn true
- TanimCurveLyt`;
-
- int $weighted[] = `keyTangent -query -weightedTangents $nodeName`;
-
- string $control = `checkBoxGrp
- -label ""
- -label1 "Weighted Tangents"
- -numberOfCheckBoxes 1
- -value1 $weighted[0]
- -changeCommand ("keyTangent -edit -weightedTangents #1 " + $nodeName)
- weightOptionGrp`;
- scriptJob
- -replacePrevious
- -parent $control
- -attributeChange ($nodeName + ".weightedTangents") ("AEupdateWeightOptionGrp " + `setParent -query` + " " + $control + " " + $nodeName);
- checkBoxGrp
- -label " "
- -label1 "Expand Spreadsheet"
- -numberOfCheckBoxes 1
- -value1 false
- -changeCommand "animCurveExpand_CB"
- expandChkBoxGrp;
- frameLayout
- -label "Keys"
- -labelVisible true
- -borderVisible true
- -collapsable false
- -collapse false
- keyframeLyt;
-
- keyframeOutliner -height 234
- -display "narrow" keyOutliner;
-
- setParent ..;
-
- setParent ..;
-
- keyframeOutliner -edit -animCurve $nodeName keyOutliner;
- }
-
-
- global proc AEanimCurveReplace (string $attr)
- {
- string $buffer[];
- tokenize($attr,".",$buffer);
- string $nodeName = $buffer[0];
-
- int $weighted[] = `keyTangent -query -weightedTangents $nodeName`;
-
- string $control = `checkBoxGrp -edit
- -value1 $weighted[0]
- -changeCommand ("keyTangent -edit -weightedTangents #1 " + $nodeName)
- weightOptionGrp`;
- scriptJob
- -replacePrevious
- -parent $control
- -attributeChange ($nodeName + ".weightedTangents") ("AEupdateWeightOptionGrp " + `setParent -query` + " " + $control + " " + $nodeName);
-
- keyframeOutliner -edit -animCurve $nodeName keyOutliner;
- }
-
- global proc AEanimCurveCommon( string $nodeName )
- {
-
- editorTemplate -addControl "preInfinity";
- editorTemplate -addControl "postInfinity";
- editorTemplate -callCustom "AEanimCurveNew"
- "AEanimCurveReplace"
- "preInfinity";
- editorTemplate -suppress "stipplePattern";
- editorTemplate -suppress "outStippleThreshold";
- editorTemplate -suppress "outStippleRange";
- editorTemplate -suppress "inStippleRange";
- editorTemplate -suppress "stippleReverse";
- editorTemplate -suppress "keyValueSwitch";
- }
-